package com.rightsidetech.user.service;

import com.github.pagehelper.PageInfo;
import com.rightsidetech.commom.base.ResponseData;
import com.rightsidetech.commom.dto.response.AdminHomeTopResp;
import com.rightsidetech.commom.service.IService;
import com.rightsidetech.user.dtos.requst.UserInfoReq;
import com.rightsidetech.user.dtos.response.*;
import com.rightsidetech.user.entity.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Package: com.rightsidetech.user.service
 * @ClassName: UserInfoService
 * @Author: yinj
 * @CreateTime: 2021/10/19 14:15
 * @Description: TODO
 */
public interface UserInfoService extends IService<UsUserLoginInfo,Long> {
    ResponseData<PageInfo<UserInfoResp>> listuser(UserInfoReq req);

    ResponseData addBlacklist(Long userInfoId,Byte status);

    List<UserInfoResp> exportList(UserInfoReq userInfoReq);

    String getMaxMemberNo();

    LoginResponse getLoginResponseByOpenId(String openid);

    int updateTokenByLoginInfoId(Long loginInfoId, String token, String clientIp) throws Exception;

    LoginResponse checkOpenId(String openid, String clientIp) throws Exception;

    LoginResponse registerUser(String phoneNumber, String openid, String maxMemberNo,String code, String type, String clientIp,
                               Byte level,String levelName,String headImg,String petName) throws Exception;

    ResponseData<UserInfoDetailsResp> findDetals(Long id);

    UsUserLoginInfo userCheckToken(String tokenApp);

    UsUserWechatInfo findOpenid(String openid);

    LoginInfoResp getLoginInfo(Long userInfoId);

    LoginInfoResp getUserInfoByUserInfoId(Long userInfoId);

    String getHeadImg(Long userInfoId);

    ResponseData logout(Long userInfoId);

    LoginResponse getLoginResponseByUserId(String userId);

    ResponseData updateUsUserStatis(Long userInfoId, BigDecimal consumeAmount);

    void updateUserLevel(UsUserAccountInfo accountInfo);

    UserAddressResp findAddressByUserInfoId(Long addressId, Long userInfoId);

    String findForOpenId(Long userInfoId);

    AdminHomeTopResp userStatis();

    UsLoginNameResp selectByPrimaryKey(Long id);

    Long selectByLoginId(Long loginId);

    UsUserInfo findByPhoneNo(String phoneNo);

    UsUserInfo registerImportOrder(String phoneNumber, String maxMemberNo, String code, Byte level, String levelName, String usName, UsUserAddress usUserAddress);

    String findPhoneByNO(Long loginId);
}
